<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:OfficeIntegration">

    <local:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />

    <Style TargetType="local:ConfirmDialog">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:ConfirmDialog">
                    <Grid Margin="2">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <ContentPresenter Margin="2"
                            x:Name="contentPresenter"
                            Content="{TemplateBinding Content}"/>
                        <StackPanel Orientation="Horizontal" Grid.Row="2" HorizontalAlignment="Right">
                            <Button x:Name="OKButton" 
                                    Content="{TemplateBinding OkButtonTitle}" 
                                    Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=OkButtonVisible, Converter={StaticResource BooleanToVisibilityConverter} }"
                                    Width="75" Height="23" Margin="0,5,2,5" />
                            <Button x:Name="CancelButton" 
                                    Content="{TemplateBinding CancelButtonTitle}" 
                                    Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CancelButtonVisible, Converter={StaticResource BooleanToVisibilityConverter} }"
                                    Width="75" Height="23" Margin="0,5,2,5" />
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
